/*
using MyGeneration/Template/NHibernate (c) by lujan99@usa.net
*/
using System;
using System.Collections;
using System.Collections.Generic;

namespace Rodunu.Movies.Contracts
{
	/// <summary>
	/// NetflixTokenStore object for NHibernate mapped table 'NetflixTokenStore'.
	/// </summary>
	[Serializable]
	public class NetflixTokenStore : IIdentifier
	{
		#region Member Variables
		protected long _id;
		protected UserInfo _userinfo;
		protected int _type;
		protected string _token;
		protected string _secret;
		protected string _consumerkey;
		protected int _status;
		#endregion
		#region Constructors
			
		public NetflixTokenStore() {}
					
		public NetflixTokenStore(UserInfo userinfo, int type, string token, string secret, string consumerkey, int status) 
		{
			this._userinfo= userinfo;
			this._type= type;
			this._token= token;
			this._secret= secret;
			this._consumerkey= consumerkey;
			this._status= status;
		}

		#endregion
		#region Public Properties
		public  virtual long Id
		{
			get { return _id; }
			set {_id= value; }
		}
		public  virtual UserInfo UserInfo
		{
			get { return _userinfo; }
			set {_userinfo= value; }
		}
		public  virtual int Type
		{
			get { return _type; }
			set {_type= value; }
		}
		public  virtual string Token
		{
			get { return _token; }
			set {_token= value; }
		}
		public  virtual string Secret
		{
			get { return _secret; }
			set {_secret= value; }
		}
		public  virtual string ConsumerKey
		{
			get { return _consumerkey; }
			set {_consumerkey= value; }
		}
		public  virtual int Status
		{
			get { return _status; }
			set {_status= value; }
		}
		#endregion
		
		#region Equals And HashCode Overrides
		/// <summary>
		/// local implementation of Equals based on unique value members
		/// </summary>
		public override bool Equals( object obj )
		{
			if( this == obj ) return true;
			if( ( obj == null ) || ( obj.GetType() != this.GetType() ) ) return false;
			NetflixTokenStore castObj = (NetflixTokenStore)obj;
			return ( castObj != null ) &&
			this._id == castObj.Id;
		}
		/// <summary>
		/// local implementation of GetHashCode based on unique value members
		/// </summary>
		public override int GetHashCode()
		{
			int hash = 57;
			hash = 27 * hash * _id.GetHashCode();
			return hash;
		}
		#endregion
		
	}
}
